<template>
	<view class="test">
		hello,test {{info}}
	</view>
</template>

<script>
	import FileOpera from '@/core/file/File.js'
	import DirectoryOpera from '@/core/file/directory.js'
	export default{
		data(){
			return {
				info:"",
				file:null,
				directory:null,
			}
		},
		mounted(){
			// this.createDirectory('text')
			this.initFile("hh")
			
		},
		methods:{
			createDirectory(dirname){
				if(!this.directory){
					this.directory=new DirectoryOpera()
				}
				let baseUrl="/storage/emulated/0/"
				let fileUrl=baseUrl+dirname
				this.directory.getDirsys(fileUrl).then(res=>{
					console.log(res)
				})
				this.directory.createNewDir(baseUrl,dirname).then(res=>{
					console.log(res)
				})
				
			},
			initFile(filename){
				if(!this.file){
					this.file=new FileOpera()
				}
				this.file.getRootSDCar()
				// this.file.getAbsolutePath("/Documents")
				// this.file.getDirList("Documents")
			}
		
		
		}
		
	}
</script>

<style>
</style>